<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CrateShopProdctImagesTable extends Migration
{
    public function up()
    {
        //  产品图片
        Schema::create('shop_product_images', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('product_id')->comment('产品ID');
            $table->string('url')->comment('图片地址');
            $table->tinyInteger('sort')->default(50)->comment('排序');
            $table->timestamps();
        });
    }
    public function down()
    {
        Schema::dropIfExists('shop_product_images');
    }
}
